Python ->tkinter->GUI?

You want to add something like the following in your code.

You want to add something like the following in your code: def OnButton(): exampleData = (0.124167 , 'e'), (0.0969225 , 't'),(0.0820011 , 'a'), huffTree = makeHuffTree(exampleData) printHuffTree(huffTree) button = Button(root, text="Press me! ", command=OnButton) button.pack() If by '"print" result's in GUI. " you mean you want the results to appear in a window rather than on stdout, you'll need to add something like a text widget and replace all your print statements with .

Insert statements.

Many thanks for this hint, I change my code(see on edit2), but now I don't know how to make windows, which will show my results in GUI. This "printHuffTree(huffTree)" print result's in IDLE. – thaking Dec 13 '10 at 12:19 2 @thaking: like I said in my answer, you'll need to create a text widget (eg: textwidget=Text(root, ...); textwidget.

Pack(...) and change your print statements to insert statements. The only way to get a satisfactory result, though, is to take some time to work through a Tkinter tutorial. Just asking for a specific solution to your specific problem will result in an endless cycle of "thanks, but now how do I ...".

– Bryan Oakley Dec 13 '10 at 12:41.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions